1. Field of the Invention
The present invention relates to relational database systems, and more particularly to a relational database system that facilitates persistent storage of xe2x80x9cobjectsxe2x80x9d from an object-oriented programming system within a tabular-relational framework. The present invention additionally provides a graphical user interface for viewing and performing operations on object-relational data.
2. Related Art
As object-oriented programming systems are increasingly used by computer programmers, numerous software tools and systems have been adapted to handle objects and their related methods. However, existing relational database systems are not designed to accommodate and manipulate objects, which are typically composed of attributes, some of which may reference other objects. For example, a conventional relational database system stores data in tables which comprise rows and columns of entries containing scalar values. At present, it is not possible to store objects in these tables because the entries in these tables are not designed to accommodate objects.
Additionally, a number of graphical tools are presently used to manipulate and view database structures such as tables. However, existing tools are not designed to manipulate and view database structures that store objects. Existing tools only allow a user to view and manipulate scalar values stored in tables; they do not allow the constituent attributes of an object to be viewed and manipulated, nor do they allow objects referenced within other objects to be retrieved for viewing and manipulation.
Hence, what is needed is a database system that facilitates persistent storage of objects. Additionally, what is needed are database tools that allow objects stored within a database system to be easily viewed and manipulated.
Another issue in viewing stored objects in a database system is the fact that many database systems are designed to work within a client-server distributed system. Typically, a client computer system accesses information contained in a database on a server computer system. In order to achieve a reasonable level of performance in such a system, it is desirable to minimize the number of communications that take place between client and server computer systems across the communication network. These communications are typically time-consuming and can potentially clog up the communication network. To this end, some existing distributed database systems attempt to minimize the number of communications that take place by first examining a query on the client to ensure the query properly references existing database structures on the server before sending the query to the server. If the query does not properly reference existing database structures on the server, the query is not sent to the server. Instead, a user on the client computer system is asked to correct the query or enter a new query. In this way, unnecessary communications from client to server computer systems are avoided. However, these distributed database systems are not designed to accommodate objects. In particular, these distributed database systems are not designed to determine whether a query properly references object data stored on the server.
Hence, what is needed is a distributed database system that can determine whether a query properly references object data stored in database structures on a server before the query is sent to the server.
One embodiment of the present invention provides a method for constructing a query for an object-relational database. This method displays at least part of a schema for the object-relational database to a user in a graphical representation. Next, the method allows the user to perform graphical manipulations on the schema. The method then generates a query based upon the schema and the graphical manipulations, and this query is sent to the object-relational database.
Another embodiment of the present invention provides a method for processing an object-relational query for transmission from a client to an object-relational database server. This method receives the query at the client, and parses the query to determine which object-relational structures the query is attempting to access. The method then determines from data dictionary information loaded from the object-relational database server and cached locally on the client, if the object-relational structures the query is attempting to access exist in the object-relational database server. If not, the method indicates an error condition.
In a variation on this embodiment, if the object-relational structures exist on the object-relational database server, the method sends the query to the object-relational database server. In another variation, if the object-relational structures exist on the object-relational database server, the method displays the query to a user, and if a command is received from the user to send the query, the client sends the query to the object-relational database server.
Yet another variation includes displaying the query to a user at the client computing system, and allowing the user to modify the query through manipulations of graphical objects representing the query. These modifications may include adding new tables to the query, selecting different columns for the query, and modifying conditions of the query.
Yet another embodiment of the present invention provides a method for displaying objects defined within an object-oriented programming system that are stored in a relational table structure. This method displays a table of objects so that a first object in the table is represented by an identifier. The method next receives a command from a user to provide a more-detailed display of the first object. In response to this command, the method retrieves attributes of the first object from a data store, and displays an expanded representation of the first object by displaying the attributes.
In a variation on this embodiment, displaying the expanded representation of the first object includes displaying an expanded representation of the entire first table.
Another variation includes receiving a command from the user to provide a more-detailed display of an attribute of the first object. If this attribute represents a second object, the method retrieves attributes of the second object from the data store, and displays an expanded representation of the second object by displaying the attributes of the second object.
In another variation, retrieving the attributes of the first object from the data store includes retrieving the attributes of the first object from an object table. This object table contains a collection of objects that can be referenced from other tables.